<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;

class IndexShareDataProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        View::composer(

            [
                'Home/Index/index',    //首页
                'Home/Articles/detail', //文章详情
                'Admin/Login/login' //后台登录页
            ], 

            'App\Http\ViewComposers\IndexComposer'
        );
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
